﻿using System.IO;

namespace MEF_Test.Bricks.Subtitles
{
    using System.Collections.Generic;

    using MEF_Test.Contracts;

    public interface ISubtitlesProvider
    {
        ///// <summary>
        ///// Gets the subtitles.
        ///// </summary>
        ///// <param name="filename">The filename.</param>
        ///// <returns>The subtitles description</returns>
        //IEnumerable<ISubtitleViewModel> GetSubtitlesList(string filename);

        /// <summary>
        /// Gets the name of the provider.
        /// </summary>
        /// <returns>The name of the subtitles provider.</returns>
        string GetProviderName();

        /// <summary>
        /// Gets the subtitles.
        /// </summary>
        /// <param name="node">The media node.</param>
        /// <returns>
        /// The subtitles descriptions grouped by provider
        /// </returns>
        IEnumerable<ISubtitleViewModel> GetSubtitles(IBrowserNodeViewModel node);

        /// <summary>
        /// Gets the subtitles async.
        /// </summary>
        /// <param name="node">The node.</param>
        /// <returns></returns>
        SubtitlesProviderResults GetSubtitlesAsync(IBrowserNodeViewModel node);

        /// <summary>
        /// Downloads the subtitle file.
        /// </summary>
        /// <param name="subtitleViewModel">The subtitle view model.</param>
        /// <returns>
        /// A stream to the content of the subtitle file.
        /// </returns>
        Stream OpenSubtitleFile(int subtitleViewModel);
    }
}